// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   ListPrice.java

package include.get_name_from_ID;

import include.nseer_db.nseer_db;
import java.sql.ResultSet;

public class ListPrice
{

	public ListPrice()
	{
	}

	public double getPrice(String unit_db_name, String file_ID, String account_period)
	{
		nseer_db db = new nseer_db(unit_db_name);
		double price = 0.0D;
		try
		{
			String sql = (new StringBuilder("select * from finance_gl where file_ID='")).append(file_ID).append("' and account_period='").append(account_period).append("'").toString();
			ResultSet rs = db.executeQuery(sql);
			if (rs.next())
				price = rs.getDouble("current_balance_sum") / rs.getDouble("current_balance_amount");
			db.close();
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		return price;
	}
}
